//
//  ShengJingViewController+LCAVPlay.m
//  JKFuYinProject
//
//  Created by jiukuyinyue on 2017/10/10.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "ShengJingViewController+LCAVPlay.h"

@implementation ShengJingViewController (LCAVPlay)

-(void)creareAVPlay{
    // 安装通知
    [self setupNotifications];
}

- (void)dealloc {
    [self teardownNotifications];
}
#pragma mark - 通知处理 -
// 安装通知
- (void)setupNotifications {
    // 1. 安装播放状态发生变化的通知
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:@"PUSHPLAYPAGE" object:nil];
    
}

// 卸载通知
- (void)teardownNotifications {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - 通知处理回调
///跳转到播放页
-(void)receiveNotification:(NSNotification *)notification{
    
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LCPlayStoryboard" bundle:nil];
    UIViewController *controller = [sb instantiateInitialViewController];
    [self presentViewController:controller animated:YES completion:nil];
    
}

@end
